package com.xujiang.imitationcompanypj.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.etekcity.vesync.common.adapter.BaseFragmentStatePagerAdapter;
import com.flyco.tablayout.listener.CustomTabEntity;
import com.xujiang.imitationcompanypj.model.MainTabEntity;

import java.util.List;

/**
 * Created by xujiang on 2017/3/31.
 */

public class MainPageAdapter extends BaseFragmentStatePagerAdapter<CustomTabEntity> {
    public MainPageAdapter(FragmentManager fm, Context context, List<CustomTabEntity> tabEntities) {
        super(fm, context,tabEntities);
    }

    @Override
    public Fragment getItemFragment(CustomTabEntity item, int position) {
        return ((MainTabEntity) item).getFragment();
    }
}
